<?php
apf_require_class('DAO_DAO');
class Dao_Attendance_AdminRole extends DAO {

    public function get_table_name() {
        return "admin_role";
    }

    public function get_read_pdo_name() {
        return "attendance_slave";
    }

    public function get_write_pdo_name() {
        return "attendance_master";
    }

    public function get_table_pk() {
        return "id";
    }

    /**
     * 获得管理员角色菜单
     * @@return array
     */
    public function get_admin_role() {
        $role = "管理员";
        $where = array(
                "name = ?" => $role
        );
        return $this->find($where,null,1);
    }
}